﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace peonwar
{
    class ResearchEigth : Research
    {
        Timer countDown;

        public ResearchEigth(Vector2 _position, Texture2D _texture, User au)
            : base(_position, _texture, au)
        {

            name = GameData.GameString[185];
            description = GameData.GameString[186];

            countDown = new Timer(50);

            time = 225;
            timer = new Timer(time);
        }

        public override void competance()
        {
            if (countDown.UpdateTimer())
            {
                countDown.RestartTimer();
                Unit renfort = new UnitHeavy2(associatedUser);
                renfort.Cost = 0;
                renfort.drawingColor = Color.Aquamarine;
                associatedUser.SpawnUnit(renfort);
            }
        }
    }
}
